home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / RESOURCES / KOOB / common / ui / defaultProfiles.cs < prev    next >
Text File  |  2005-11-23  |  17KB  |  645 lines

  1. //-----------------------------------------------------------------------------
  2. // Torque Game Engine 
  3. // Copyright (C) GarageGames.com, Inc.
  4. //-----------------------------------------------------------------------------
  5.  
  6. //--------------------------------------------------------------------------
  7.  
  8. $Gui::fontCacheDirectory = expandFilename("./cache");
  9. $Gui::clipboardFile      = expandFilename("./cache/clipboard.gui");
  10.  
  11. // GuiDefaultProfile is a special case, all other profiles are initialized
  12. // to the contents of this profile first then the profile specific
  13. // overrides are assigned.
  14.  
  15. if(!isObject(GuiDefaultProfile)) new GuiControlProfile (GuiDefaultProfile)
  16. {
  17.    tab = false;
  18.    canKeyFocus = false;
  19.    hasBitmapArray = false;
  20.    mouseOverSelected = false;
  21.  
  22.    // fill color
  23.    opaque = false;
  24.    fillColor = ($platform $= "macos") ? "211 211 211" : "192 192 192";
  25.    fillColorHL = ($platform $= "macos") ? "244 244 244" : "220 220 220";
  26.    fillColorNA = ($platform $= "macos") ? "244 244 244" : "220 220 220";
  27.  
  28.    // border color
  29.    border = false;
  30.    borderColor   = "0 0 0";
  31.    borderColorHL = "128 128 128";
  32.    borderColorNA = "64 64 64";
  33.    
  34.    bevelColorHL = "255 255 255";
  35.    bevelColorLL = "0 0 0";
  36.  
  37.    // font
  38.    fontType = "Arial";
  39.    fontSize = 14;
  40.    fontCharset = CHINESEBIG5;
  41.  
  42.    fontColor = "0 0 0";
  43.    fontColorHL = "32 100 100";
  44.    fontColorNA = "0 0 0";
  45.    
  46.  
  47.    // bitmap information
  48.    bitmap = ($platform $= "macos") ? "./osxWindow" : "./darkWindow";
  49.    bitmapBase = "";
  50.    textOffset = "0 0";
  51.  
  52.    // used by guiTextControl
  53.    modal = true;
  54.    justify = "left";
  55.    autoSizeWidth = false;
  56.    autoSizeHeight = false;
  57.    returnTab = false;
  58.    numbersOnly = false;
  59.    cursorColor = "0 0 0 255";
  60.  
  61.    // sounds
  62.    soundButtonDown = "";
  63.    soundButtonOver = "";
  64. };
  65.  
  66. if(!isObject(GuiInputCtrlProfile)) new GuiControlProfile( GuiInputCtrlProfile )
  67. {
  68.    tab = true;
  69.     canKeyFocus = true;
  70. };
  71.  
  72. if(!isObject(GuiDialogProfile)) new GuiControlProfile(GuiDialogProfile);
  73.  
  74.  
  75. if(!isObject(GuiSolidDefaultProfile)) new GuiControlProfile (GuiSolidDefaultProfile)
  76. {
  77.    opaque = true;
  78.    border = true;
  79. };
  80.  
  81. if(!isObject(GuiWindowProfile)) new GuiControlProfile (GuiWindowProfile)
  82. {
  83.    opaque = true;
  84.    border = 2;
  85.    fillColor = ($platform $= "macos") ? "211 211 211" : "192 192 192";
  86.    fillColorHL = ($platform $= "macos") ? "190 255 255" : "64 150 150";
  87.    fillColorNA = ($platform $= "macos") ? "255 255 255" : "150 150 150";
  88.    fontColor = ($platform $= "macos") ? "0 0 0" : "255 255 255";
  89.    fontColorHL = ($platform $= "macos") ? "200 200 200" : "0 0 0";
  90.    text = "GuiWindowCtrl test";
  91.    bitmap = ($platform $= "macos") ? "./osxWindow" : "./darkWindow";
  92.    textOffset = ($platform $= "macos") ? "5 5" : "6 6";
  93.    hasBitmapArray = true;
  94.    justify = ($platform $= "macos") ? "center" : "left";
  95. };
  96.  
  97. if(!isObject(GuiToolWindowProfile)) new GuiControlProfile (GuiToolWindowProfile)
  98. {
  99.    opaque = true;
  100.    border = 2;
  101.    fillColor = "192 192 192";
  102.    fillColorHL = "64 150 150";
  103.    fillColorNA = "150 150 150";
  104.    fontColor = "255 255 255";
  105.    fontColorHL = "0 0 0";
  106.    bitmap = "./torqueToolWindow";
  107.    textOffset = "6 6";
  108. };
  109.  
  110. if( !isObject(GuiTabBookProfile) ) new GuiControlProfile (GuiTabBookProfile)
  111. {
  112.    fillColor = "255 255 255";
  113.    fillColorHL = "64 150 150";
  114.    fillColorNA = "150 150 150";
  115.    fontColor = "0 0 0";
  116.    fontColorHL = "32 100 100";
  117.    fontColorNA = "0 0 0";
  118.    justify = "center";
  119.    bitmap = "./darkTab";
  120.    tabWidth = 64;
  121.    tabHeight = 24;
  122.    tabPosition = "Top";
  123.    tabRotation = "Horizontal";
  124.    tab = true;
  125.    cankeyfocus = true;
  126. };
  127.  
  128. if( !isObject(GuiTabPageProfile) ) new GuiControlProfile (GuiTabPageProfile)
  129. {
  130.    bitmap = "./darkTabPage";
  131.    tab = true;
  132. };
  133.  
  134.  
  135. if(!isObject(GuiContentProfile)) new GuiControlProfile (GuiContentProfile)
  136. {
  137.    opaque = true;
  138.    fillColor = "255 255 255";
  139. };
  140.  
  141. if(!isObject(GuiModelessDialogProfile)) new GuiControlProfile("GuiModelessDialogProfile")
  142. {
  143.    modal = false;
  144. };
  145.  
  146. if(!isObject(GuiButtonProfile)) new GuiControlProfile (GuiButtonProfile)
  147. {
  148.    opaque = true;
  149.    border = true;
  150.    fontColor = "0 0 0";
  151.    fontColorHL = "32 100 100";
  152.    fixedExtent = true;
  153.    justify = "center";
  154.     canKeyFocus = false;
  155. };
  156.  
  157. if(!isObject(GuiBorderButtonProfile)) new GuiControlProfile (GuiBorderButtonProfile)
  158. {
  159.    fontColorHL = "0 0 0";
  160. };
  161.  
  162. if(!isObject(GuiMenuBarProfile)) new GuiControlProfile (GuiMenuBarProfile)
  163. {
  164.  
  165.    fontType = "Arial";
  166.    fontSize = 15;
  167.    opaque = true;
  168.    fillColor = ($platform $= "macos") ? "211 211 211" : "192 192 192";
  169.    fillColorHL = "0 0 96";
  170.    border = 4;
  171.    fontColor = "0 0 0";
  172.    fontColorHL = "255 255 255";
  173.    fontColorNA = "128 128 128";
  174.    fixedExtent = true;
  175.    justify = "center";
  176.    canKeyFocus = false;
  177.    mouseOverSelected = true;
  178.    bitmap = ($platform $= "macos") ? "./osxMenu" : "./torqueMenu";
  179.    hasBitmapArray = true;
  180. };
  181.  
  182. if(!isObject(GuiButtonSmProfile)) new GuiControlProfile (GuiButtonSmProfile : GuiButtonProfile)
  183. {
  184.    fontSize = 14;
  185. };
  186.  
  187. if(!isObject(GuiRadioProfile)) new GuiControlProfile (GuiRadioProfile)
  188. {
  189.    fontSize = 14;
  190.    fillColor = "232 232 232";
  191.    fontColorHL = "32 100 100";
  192.    fixedExtent = true;
  193.    bitmap = ($platform $= "macos") ? "./osxRadio" : "./torqueRadio";
  194.    hasBitmapArray = true;
  195. };
  196.  
  197. if(!isObject(GuiScrollProfile)) new GuiControlProfile (GuiScrollProfile)
  198. {
  199.    opaque = true;
  200.    fillColor = "255 255 255";
  201.    border = 3;
  202.    borderThickness = 2;
  203.    borderColor = "0 0 0";
  204.    bitmap = ($platform $= "macos") ? "./osxScroll" : "./darkScroll";
  205.    hasBitmapArray = true;
  206. };
  207.  
  208. if(!isObject(VirtualScrollProfile)) new GuiControlProfile (VirtualScrollProfile : GuiScrollProfile);
  209.  
  210. if(!isObject(GuiSliderProfile)) new GuiControlProfile (GuiSliderProfile);
  211.  
  212. if(!isObject(GuiTextProfile)) new GuiControlProfile (GuiTextProfile)
  213. {
  214.    fontColor = "0 0 0";
  215.    fontColorLink = "255 96 96";
  216.    fontColorLinkHL = "0 0 255";
  217.    autoSizeWidth = true;
  218.    autoSizeHeight = true;
  219. };
  220.  
  221. if(!isObject(GuiMediumTextProfile)) new GuiControlProfile (GuiMediumTextProfile : GuiTextProfile)
  222. {
  223.    fontSize = 24;
  224. };
  225.  
  226. if(!isObject(GuiBigTextProfile)) new GuiControlProfile (GuiBigTextProfile : GuiTextProfile)
  227. {
  228.    fontSize = 36;
  229. };
  230.  
  231. if(!isObject(GuiCenterTextProfile)) new GuiControlProfile (GuiCenterTextProfile : GuiTextProfile)
  232. {
  233.    justify = "center";
  234. };
  235.  
  236. if(!isObject(GuiTextEditProfile)) new GuiControlProfile (GuiTextEditProfile)
  237. {
  238.    opaque = true;
  239.    fillColor = "255 255 255";
  240.    fillColorHL = "128 128 128";
  241.    border = 3;
  242.    borderThickness = 2;
  243.    borderColor = "0 0 0";
  244.    fontColor = "0 0 0";
  245.    fontColorHL = "255 255 255";
  246.    fontColorNA = "128 128 128";
  247.    textOffset = "0 2";
  248.    autoSizeWidth = false;
  249.    autoSizeHeight = true;
  250.    tab = true;
  251.    canKeyFocus = true;
  252. };
  253.  
  254. if(!isObject(GuiControlListPopupProfile)) new GuiControlProfile (GuiControlListPopupProfile)
  255. {
  256.    opaque = true;
  257.    fillColor = "255 255 255";
  258.    fillColorHL = "128 128 128";
  259.    border = true;
  260.    borderColor = "0 0 0";
  261.    fontColor = "0 0 0";
  262.    fontColorHL = "255 255 255";
  263.    fontColorNA = "128 128 128";
  264.    textOffset = "0 2";
  265.    autoSizeWidth = false;
  266.    autoSizeHeight = true;
  267.    tab = true;
  268.    canKeyFocus = true;
  269.    bitmap = ($platform $= "macos") ? "./osxScroll" : "./darkScroll";
  270.    hasBitmapArray = true;
  271. };
  272.  
  273. if(!isObject(GuiTextArrayProfile)) new GuiControlProfile (GuiTextArrayProfile : GuiTextProfile)
  274. {
  275.    fontColorHL = "32 100 100";
  276.    fillColorHL = "200 200 200";
  277. };
  278.  
  279. if(!isObject(GuiTextListProfile)) new GuiControlProfile (GuiTextListProfile : GuiTextProfile) 
  280. {
  281.    tab = true;
  282.    canKeyFocus = true;
  283. };
  284.  
  285. if(!isObject(GuiBaseTreeViewProfile)) new GuiControlProfile (GuiBaseTreeViewProfile)
  286. {
  287.    fontSize = 13;  // dhc - trying a better fit...
  288.    fontColor = "0 0 0";
  289.    fontColorHL = "64 150 150";
  290.    canKeyFocus = true;
  291.    autoSizeHeight = true;
  292. };
  293.  
  294. if(!isObject(GuiChatMenuTreeProfile)) new GuiControlProfile (GuiChatMenuTreeProfile : GuiBaseTreeViewProfile);
  295.  
  296. if(!isObject(GuiTreeViewProfile)) new GuiControlProfile (GuiTreeViewProfile : GuiBaseTreeViewProfile)
  297. {
  298.    fontColorSEL= "250 250 250"; 
  299.    fillColorHL = "0 60 150";
  300.    fontColorNA = "240 240 240";
  301.    bitmap = "./shll_treeView";
  302. };
  303.  
  304. if(!isObject(GuiDirectoryTreeProfile)) new GuiControlProfile ( GuiDirectoryTreeProfile : GuiTreeViewProfile )
  305. {
  306.    fontColor = "40 40 40";
  307.    fontColorSEL= "250 250 250 175"; 
  308.    fillColorHL = "0 60 150";
  309.    fontColorNA = "240 240 240";
  310.    bitmap = "./shll_treeView";
  311.    fontType = "Arial";
  312.    fontSize = 14;
  313. };
  314.  
  315. if(!isObject(GuiDirectoryFileListProfile)) new GuiControlProfile ( GuiDirectoryFileListProfile )
  316. {
  317. fontColor = "40 40 40";
  318. fontColorSEL= "250 250 250 175"; 
  319. fillColorHL = "0 60 150";
  320. fontColorNA = "240 240 240";
  321. fontType = "Arial";
  322. fontSize = 14;
  323. };
  324.  
  325.  
  326.  
  327. if(!isObject(GuiCheckBoxProfile)) new GuiControlProfile (GuiCheckBoxProfile)
  328. {
  329.    opaque = false;
  330.    fillColor = "232 232 232";
  331.    border = false;
  332.    borderColor = "0 0 0";
  333.    fontSize = 14;
  334.    fontColor = "0 0 0";
  335.    fontColorHL = "32 100 100";
  336.    fixedExtent = true;
  337.    justify = "left";
  338.    bitmap = ($platform $= "macos") ? "./osxCheck" : "./torqueCheck";
  339.    hasBitmapArray = true;
  340.  
  341. };
  342.  
  343. if(!isObject(GuiPopUpMenuProfile)) new GuiControlProfile (GuiPopUpMenuProfile)
  344. {
  345.    opaque = true;
  346.    mouseOverSelected = true;
  347.  
  348.    border = 4;
  349.    borderThickness = 2;
  350.    borderColor = "0 0 0";
  351.    fontSize = 14;
  352.    fontColor = "0 0 0";
  353.    fontColorHL = "32 100 100";
  354.    fontColorSEL = "32 100 100";
  355.    fixedExtent = true;
  356.    justify = "center";
  357.    bitmap = ($platform $= "macos") ? "./osxScroll" : "./darkScroll";
  358.    hasBitmapArray = true;
  359. };
  360.  
  361. if(!isObject(LoadTextProfile)) new GuiControlProfile ("LoadTextProfile")
  362. {
  363.    fontColor = "66 219 234";
  364.    autoSizeWidth = true;
  365.    autoSizeHeight = true;
  366. };
  367.  
  368.  
  369. if(!isObject(GuiMLTextProfile)) new GuiControlProfile ("GuiMLTextProfile")
  370. {
  371.    fontColorLink = "255 96 96";
  372.    fontColorLinkHL = "0 0 255";
  373. };
  374.  
  375. if(!isObject(GuiMLTextNoSelectProfile)) new GuiControlProfile ("GuiMLTextNoSelectProfile")
  376. {
  377.    fontColorLink = "255 96 96";
  378.    fontColorLinkHL = "0 0 255";
  379.    modal = false;
  380. };
  381.  
  382. if(!isObject(GuiMLTextEditProfile)) new GuiControlProfile (GuiMLTextEditProfile) 
  383.    fontColorLink = "255 96 96"; 
  384.    fontColorLinkHL = "0 0 255"; 
  385.  
  386.    fillColor = "255 255 255"; 
  387.    fillColorHL = "128 128 128"; 
  388.  
  389.    fontColor = "0 0 0"; 
  390.    fontColorHL = "255 255 255"; 
  391.    fontColorNA = "128 128 128"; 
  392.  
  393.    autoSizeWidth = true; 
  394.    autoSizeHeight = true; 
  395.    tab = true; 
  396.    canKeyFocus = true; 
  397. }; 
  398.  
  399. if(!isObject(GuiToolTipProfile)) new GuiControlProfile (GuiToolTipProfile)
  400. {
  401.    tab = false;
  402.    canKeyFocus = false;
  403.    hasBitmapArray = false;
  404.    mouseOverSelected = false;
  405.  
  406.    // fill color
  407.    opaque = true;
  408.    fillColor = "255 255 225";
  409.  
  410.    // border color
  411.    border = true;
  412.    borderColor   = "0 0 0";
  413.    
  414.    fontColor = "0 0 0";
  415.    fontColorHL = "0 0 0";
  416.    fontColorNA = "0 0 0";
  417.    
  418.  
  419.    // used by guiTextControl
  420.    modal = true;
  421.    justify = "left";
  422.    autoSizeWidth = false;
  423.    autoSizeHeight = false;
  424.    returnTab = false;
  425.    numbersOnly = false;
  426.    cursorColor = "0 0 0 255";
  427.  
  428. };
  429.  
  430. //--------------------------------------------------------------------------
  431. // Console Window
  432.  
  433. if(!isObject(GuiConsoleProfile)) new GuiControlProfile ("GuiConsoleProfile")
  434. {
  435.    fontType = ($platform $= "macos") ? "Monaco" : "Lucida Console";
  436.    fontSize = ($platform $= "macos") ? 13 : 12;
  437.    fontColor = "0 0 0";
  438.    fontColorHL = "130 130 130";
  439.    fontColorNA = "255 0 0";
  440.    fontColors[6] = "50 50 50";
  441.    fontColors[7] = "50 50 0";  
  442.    fontColors[8] = "0 0 50"; 
  443.    fontColors[9] = "0 50 0";   
  444. };
  445.  
  446.  
  447. if(!isObject(GuiProgressProfile)) new GuiControlProfile ("GuiProgressProfile")
  448. {
  449.    opaque = false;
  450.    fillColor = "44 152 162 100";
  451.    border = true;
  452.    borderColor   = "78 88 120";
  453. };
  454.  
  455. if(!isObject(GuiProgressTextProfile)) new GuiControlProfile ("GuiProgressTextProfile")
  456. {
  457.    fontColor = "0 0 0";
  458.    justify = "center";
  459. };
  460.  
  461. if(!isObject(GuiBitmapBorderProfile)) new GuiControlProfile(GuiBitmapBorderProfile)
  462. {
  463.    bitmap = "./darkBorder";
  464.    hasBitmapArray = true;
  465. };
  466.  
  467. if(!isObject(GuiPaneProfile)) new GuiControlProfile(GuiPaneProfile)
  468. {
  469.    bitmap = "./torquePane";
  470.    hasBitmapArray = true;
  471. };
  472.  
  473.  
  474. //////////////////////////////////////////////////////////////////////////
  475. // Gui Inspector Profiles
  476. //////////////////////////////////////////////////////////////////////////
  477.  
  478. //////////////////////////////////////////////////////////////////////////
  479. // Field Profile
  480. //////////////////////////////////////////////////////////////////////////
  481. if(!isObject(GuiInspectorFieldProfile)) new GuiControlProfile (GuiInspectorFieldProfile)
  482. {
  483.    // fill color
  484.    opaque = false;
  485.    fillColor = "255 255 255";
  486.    fillColorHL = "128 128 128";
  487.    fillColorNA = "244 244 244";
  488.  
  489.    // border color
  490.    border = false;
  491.    borderColor   = "190 190 190";
  492.    borderColorHL = "156 156 156";
  493.    borderColorNA = "64 64 64";
  494.    
  495.    bevelColorHL = "255 255 255";
  496.    bevelColorLL = "0 0 0";
  497.  
  498.    // font
  499.    fontType = "Arial";
  500.    fontSize = 16;
  501.  
  502.    fontColor = "32 32 32";
  503.    fontColorHL = "32 100 100";
  504.    fontColorNA = "0 0 0";
  505.  
  506.    tab = true;
  507.    canKeyFocus = true;
  508.    
  509. };
  510.  
  511. if(!isObject(GuiInspectorBackgroundProfile)) new GuiControlProfile (GuiInspectorBackgroundProfile : GuiInspectorFieldProfile)
  512. {
  513.    border = 5;
  514. };
  515.  
  516. if(!isObject(GuiInspectorDynamicFieldProfile)) new GuiControlProfile (GuiInspectorDynamicFieldProfile : GuiInspectorFieldProfile);
  517.  
  518. //////////////////////////////////////////////////////////////////////////
  519. // Default Field (TextEdit) Profile
  520. //////////////////////////////////////////////////////////////////////////
  521. if(!isObject(GuiInspectorTextEditProfile)) new GuiControlProfile ("GuiInspectorTextEditProfile")
  522. {
  523.    // Transparent Background
  524.    opaque = false;
  525.  
  526.    // No Border (Rendered by field control)
  527.    border = false;
  528.  
  529.    tab = true;
  530.    canKeyFocus = true;
  531.  
  532.    // font
  533.    fontType = "Arial";
  534.    fontSize = 16;
  535.  
  536.    fontColor = "32 32 32";
  537.    fontColorHL = "32 100 100";
  538.    fontColorNA = "0 0 0";
  539.  
  540. };
  541.  
  542. if(!isObject(InspectorTypeEnumProfile)) new GuiControlProfile (InspectorTypeEnumProfile : GuiInspectorFieldProfile)
  543. {
  544.    mouseOverSelected = true;
  545.    bitmap = ($platform $= "macos") ? "./osxScroll" : "./darkScroll";
  546.    hasBitmapArray = true;
  547.    opaque=true;
  548.    border=true;
  549. };
  550.  
  551. if(!isObject(InspectorTypeCheckboxProfile)) new GuiControlProfile (InspectorTypeCheckboxProfile : GuiInspectorFieldProfile)
  552. {
  553.    bitmap = ($platform $= "macos") ? "./osxCheck" : "./torqueCheck";
  554.    hasBitmapArray = true;
  555.    opaque=false;
  556.    border=false;
  557. };
  558.  
  559. // For TypeFileName browse button
  560. if(!isObject(GuiInspectorTypeFileNameProfile)) new GuiControlProfile (GuiInspectorTypeFileNameProfile)
  561. {
  562.    // Transparent Background
  563.    opaque = false;
  564.  
  565.    // No Border (Rendered by field control)
  566.    border = 5;
  567.  
  568.    tab = true;
  569.    canKeyFocus = true;
  570.  
  571.    // font
  572.    fontType = "Arial";
  573.    fontSize = 16;
  574.    
  575.    // Center text
  576.    justify = "center";
  577.  
  578.    fontColor = "32 32 32";
  579.    fontColorHL = "32 100 100";
  580.    fontColorNA = "0 0 0";
  581.  
  582.    fillColor = "255 255 255";
  583.    fillColorHL = "128 128 128";
  584.    fillColorNA = "244 244 244";
  585.  
  586.    borderColor   = "190 190 190";
  587.    borderColorHL = "156 156 156";
  588.    borderColorNA = "64 64 64";
  589.  
  590.  
  591. };
  592.  
  593.  
  594. //-------------------------------------- Cursors
  595. //
  596. new GuiCursor(DefaultCursor)
  597. {
  598.    hotSpot = "1 1";
  599.    renderOffset = "0 0";
  600.    bitmapName = "./CUR_3darrow";
  601. };
  602.  
  603. new GuiCursor(LeftRightCursor)
  604. {
  605.    hotSpot = "1 1";
  606.    renderOffset = "0.5 0";
  607.    bitmapName = "./CUR_leftright";
  608. };
  609.  
  610. new GuiCursor(UpDownCursor)
  611. {
  612.    hotSpot = "1 1";
  613.    renderOffset = "0 1";
  614.    bitmapName = "./CUR_updown";
  615. };
  616.  
  617. new GuiCursor(NWSECursor)
  618. {
  619.    hotSpot = "1 1";
  620.    renderOffset = "0.5 0.5";
  621.    bitmapName = "./CUR_nwse";
  622. };
  623.  
  624. new GuiCursor(NESWCursor)
  625. {
  626.    hotSpot = "1 1";
  627.    renderOffset = "0.5 0.5";
  628.    bitmapName = "./CUR_nesw";
  629. };
  630.  
  631. new GuiCursor(MoveCursor)
  632. {
  633.    hotSpot = "1 1";
  634.    renderOffset = "0.5 0.5";
  635.    bitmapName = "./CUR_move";
  636. };
  637.  
  638. new GuiCursor(TextEditCursor)
  639. {
  640.    hotSpot = "1 1";
  641.    renderOffset = "0.5 0.5";
  642.    bitmapName = "./CUR_textedit";
  643. };
  644.